﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../scripts/boot.js" type="text/javascript"></script>
    <script type="text/javascript">
        $.ajax({
            url: "../data/system.aspx?method=201",
            async: false,
            success: function (text) {
                if (text == "no")
                    window.location = "../system/error.html";
                else if (text == "out") {
                    var loginWindow = parent.mini.get("loginWindow");
                    if (!loginWindow.visible)
                        loginWindow.show();
                    var tabs = parent.mini.get("mainTabs");
                    var tab = tabs.getTab("tab$201");
                    tabs.removeTab(tab);
                }
            }
        });
        var States = [{ id: 0, text: '未审核' }, { id: 1, text: '已审通过' }, { id: 2, text: '已审未通过' }, { id: -1, text: '全部'}];
        var Types = [{ id: 0, text: '简历开启' }, { id: 1, text: '简历关闭' }, { id: 2, text: '简历半开启' }, { id: -1, text: '全部' }];
        var State = [{ id: 0, text: '未审核' }, { id: 1, text: '<font color="Green">已审通过</font>' }, { id: 2, text: '<font color="Red">已审未通过</font>'}];
    </script>
</head>
<body>
    <div class="mini-fit">
        <div id="divList" class="mini-fit">
            <div class="mini-toolbar" style="border-bottom: 0;">
                <table>
                    <tr>
                        <td>
                            名称：
                            <input class="mini-textbox" id="key" style="width:150px" emptytext="用户名或真实姓名关键字" />
                            审核状态：
                            <input id="state" class="mini-combobox" style="width: 85px;" data="States" value="0"/>
                            简历状态：
                            <input id="type" class="mini-combobox" style="width: 85px;" data="Types" value="-1"/>
                            学历：
                            <input id="edu" class="mini-combobox" textField="di_name" valueField="di_code" 
                                style="width: 150px;" url="../data/system.aspx?method=CbxEduNoAll" value="0"/>
                            登录日期：
                            <input id="sdate" class="mini-datepicker" style="width: 100px;"/>
                            至
                            <input id="edate" class="mini-datepicker" style="width: 100px;"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            求职意向：
                            <input id="yx1" class="mini-combobox" textField="jt_name" valueField="jt_id" onvaluechanged="onTypeChanged"
                                style="width: 150px;" url="../data/system.aspx?method=CbxJobTypeP" value="0"/>
                            <input id="yx2" class="mini-combobox" textField="jt_name" valueField="jt_id"
                                style="width: 150px;"/>
                            专业：
                            <input id="major1" class="mini-combobox" textField="ma_name" valueField="ma_id" onvaluechanged="onMajorChanged"
                                style="width: 150px;" url="../data/system.aspx?method=CbxMajorP" value="0"/>
                            <input id="major2" class="mini-combobox" textField="ma_name" valueField="ma_id"
                                style="width: 150px;"/>
                            <a class="mini-button" iconcls="icon-search" plain="true" onclick="search()">查询</a>
                            <span class="separator"></span>
                            <a class="mini-button" plain="true" iconcls="icon-excel" onclick="excelRow()">查询结果手机导出</a>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a class="mini-button" iconcls="icon-ok" plain="true" onclick="checkRows(1)">审核通过</a>
                            <a class="mini-button" iconcls="icon-no" plain="true" onclick="checkRows(2)">审核不通过</a>
                            <a class="mini-button" iconcls="icon-remove" plain="true" onclick="delRows()">删除</a>
                            <span class="separator"></span>
                            <a class="mini-button" iconcls="icon-lock" plain="true" onclick="lockRows(1)">关闭</a>
                            <a class="mini-button" iconcls="icon-unlock" plain="true" onclick="lockRows(0)">显示</a>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="mini-fit" >
                <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" allowresize="true"
                    idfield="id" multiselect="true" url="../data/system.aspx?method=GetPersonList" sizeList="[15,20,50,100]" pageSize="15">
                    <div property="columns">
                        <div type="checkcolumn">
                        </div>
                        <div cellCls="actionIcons" name="action" width="50px" headerAlign="center" align="center" renderer="onActionRenderer" cellStyle="padding:0;">操作</div>
                        <div field="pi_name" width="120px" headeralign="center" align="center" allowsort="true" renderer="onNameRenderer">
                            真实姓名</div>
                        <div field="pi_state" width="100px" headeralign="center" align="center" allowsort="true" renderer="onStateRenderer">
                            会员状态</div>
                        <div field="pi_college" width="100px" headeralign="center" align="center" allowsort="true">
                            毕业院校</div>
                        <div field="spcode" width="200px" headeralign="center" align="center" allowsort="true" renderer="onSpCodeRenderer">
                            专业</div>
                        <div field="edu" width="50px" headeralign="center" align="center" allowsort="true">
                            学历</div>
                        <div field="yx1" width="200px" headeralign="center" align="center" allowsort="true" renderer="onJobtype1Renderer">
                            求职意向1</div>
                        <div field="yx2" width="200px" headeralign="center" align="center" allowsort="true" renderer="onJobtype2Renderer">
                            求职意向2</div>
                        <div field="pi_pic" width="50px" headeralign="center" align="center" allowsort="true" renderer="onPicRenderer">
                            照片</div>
                        <div field="fw_mobile" width="80px" headeralign="center" align="center" allowsort="true" renderer="onMobileRenderer">
                            手机号码</div>
                        <div field="pi_loginnum" width="60px" headeralign="center" align="center" allowsort="true">
                            登录次数</div>
                        <div field="pi_logintime" width="120px" headeralign="center" align="center" allowsort="true" dateformat="yyyy-MM-dd HH:mm:ss">
                            最后登录时间</div>
                    </div>
                </div>
            </div>
        </div>
        <div id="editForm" class="form" style="display: none">
            <fieldset style="border: solid 1px #aaa; width: 98%">
                <legend><strong>个人详细信息</strong></legend>
                <input class="mini-hidden" name="pi_no" id="pi_no" />
                <table cellspacing="0" cellpadding="0" style="border-right: 1px solid #a8daf2; border-bottom: 1px solid #a8daf2;
                            margin-top: 10px;" width="1000px" class="formtable">
                    <tr>
                        <td class="title" colspan="8" style="text-align:center">基本情况</td>
                    </tr>
                    <tr>
                        <td class="title" style="width:100px;">
                            用户名：
                        </td>
                        <td class="text" id="pi_user">
                        </td>
                        <td class="title" style="width: 100px;">
                            姓名：
                        </td>
                        <td class="text" id="pi_name">
                        </td>
                        <td class="title" style="width: 100px;">
                            性别：
                        </td>
                        <td class="text" id="pi_sex">
                        </td>
                        <td class="title" style="width: 100px;">
                            出生年月：
                        </td>
                        <td class="text" id="pi_birth">
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            婚姻状况：
                        </td>
                        <td class="text" id="pi_marry">
                        </td>
                        <td class="title">
                            身高：
                        </td>
                        <td class="text" id="pi_height">
                        </td>
                        <td class="title">
                            体重：
                        </td>
                        <td class="text" id="pi_weight">
                        </td>
                        <td class="title">
                            政治面貌：
                        </td>
                        <td class="text" id="pi_polity">
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            民族：
                        </td>
                        <td class="text" id="pi_nation">
                        </td>
                        <td class="title">
                            职称：
                        </td>
                        <td class="text" id="pi_zhicheng">
                        </td>
                        <td class="title">
                            最高学历：
                        </td>
                        <td class="text" id="pi_edu">
                        </td>
                        <td class="title">
                            毕业时间：
                        </td>
                        <td class="text" id="pi_bysj">
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            户口所在地：
                        </td>
                        <td class="text" id="pi_hometown">
                        </td>
                        <td class="title">
                            毕业学校：
                        </td>
                        <td class="text" id="pi_college">
                        </td>
                        <td class="title">
                            专业类别：
                        </td>
                        <td class="text" id="pi_spcode">
                        </td>
                        <td class="title">
                            专业名称：
                        </td>
                        <td class="text" id="pi_sp">
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            所学外语：
                        </td>
                        <td class="text" id="pi_forlang">
                        </td>
                        <td class="title">
                            外语水平：
                        </td>
                        <td class="text" id="pi_forlevel">
                        </td>
                        <td class="title">
                            计算机水平：
                        </td>
                        <td class="text" id="pi_computer">
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" style="border-right: 1px solid #a8daf2; border-bottom: 1px solid #a8daf2;
                            margin-top: 10px;" width="1000px" class="formtable">
                    <thead>
                        <tr>
                            <td colspan="6" class="title"style="text-align:center">教育经历</td>
                        </tr>
                    </thead>
                    <tbody id="studylist"></tbody>
                </table>
                <table cellspacing="0" cellpadding="0" style="border-right: 1px solid #a8daf2; border-bottom: 1px solid #a8daf2;
                            margin-top: 10px;" width="1000px" class="formtable">
                    <thead>
                        <tr>
                            <td colspan="6" class="title" style="text-align:center">工作经历</td>
                        </tr>
                    </thead>
                    <tbody id="worklist"></tbody>
                </table>
                <table cellspacing="0" cellpadding="0" style="border-right: 1px solid #a8daf2; border-bottom: 1px solid #a8daf2;
                            margin-top: 10px;" width="1000px" class="formtable">
                    <tr><td colspan="10" class="title" style="text-align:center">求职意向</td></tr>
                    <tr>
                        <td class="title" style="width: 100px;">
                            工作性质：
                        </td>
                        <td class="text" id="pi_jobtype">
                        </td>
                        <td class="title" style="width: 100px;">
                            求职意向1：
                        </td>
                        <td class="text" id="pi_yx1">
                        </td>
                        <td class="title" style="width: 100px;">
                            求职意向2：
                        </td>
                        <td class="text" id="pi_yx2">
                        </td>
                        <td class="title" style="width: 100px;">
                            工作地区：
                        </td>
                        <td class="text" id="pi_workarea">
                        </td>
                        <td class="title" style="width: 100px;">
                            期望月薪：
                        </td>
                        <td class="text" id="pi_pay">
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            自我评价：
                        </td>
                        <td class="text" id="pi_selfexp" colspan="9">
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" style="border-right: 1px solid #a8daf2; border-bottom: 1px solid #a8daf2;
                            margin-top: 10px;" width="1000px" class="formtable">
                    <tr><td colspan="8" class="title" style="text-align:center">联系方式</td></tr>
                    <tr>
                        <td class="title" style="width: 100px;">
                            固定电话：
                        </td>
                        <td class="text" id="pi_tel">
                        </td>
                        <td class="title" style="width: 100px;">
                            手机号码：
                        </td>
                        <td class="text" id="pi_mobile">
                        </td>
                        <td class="title" style="width: 100px;">
                            电子邮件：
                        </td>
                        <td class="text" id="pi_email">
                        </td>
                        <td class="title" style="width: 100px;">
                            QQ：
                        </td>
                        <td class="text" id="pi_QQ">
                        </td>
                    </tr>
                    <tr>
                        <td class="title">
                            家庭住址：
                        </td>
                        <td class="text" id="pi_address" colspan="7">
                        </td>
                    </tr>
                </table>
                <table cellspacing="0" cellpadding="0" style="border-right: 1px solid #a8daf2; border-bottom: 1px solid #a8daf2;
                            margin-top: 10px;" width="1000px" class="formtable">
                    <tr>
                        <td class="title" style="width: 100px;"><span class="red">*</span>审核：</td>
                        <td class="text" >
                            <input id="pi_state" name="pi_state" class="mini-radiobuttonlist" data="State" required="true"/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="8" style="text-align:center;padding:5px;">
                            <a class="mini-button" style="width:80px;" onclick="updateRow()" >确认审核</a>
                            <span style="display:inline-block;width:25px;"></span>
                            <a class="mini-button" style="width:60px;" onclick="cancelRow()">取消</a>
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>
    </div>
    <iframe id="exportIFrame" style="display:none;"></iframe>
    <!--导出Excel相关HTML-->
     <form id="excelForm" action="../data/download.aspx?method=ExcelPersonTel" method="post" target="excelIFrame">
        <input type="hidden" name="key" id="Hidden1" />
        <input type="hidden" name="state" id="Hidden2" />
        <input type="hidden" name="type" id="Hidden3" />
        <input type="hidden" name="edu" id="Hidden4" />
        <input type="hidden" name="sdate" id="Hidden5" />
        <input type="hidden" name="edate" id="Hidden6" />
        <input type="hidden" name="yx1" id="Hidden7" />
        <input type="hidden" name="yx2" id="Hidden8" />
        <input type="hidden" name="major1" id="Hidden9" />
        <input type="hidden" name="major2" id="Hidden10" />
    </form>
    <iframe id="excelIFrame" name="excelIFrame" style="display:none;"></iframe>
    <script type="text/javascript">
        $.ajaxSetup({
            contentType: "application/x-www-form-urlencoded;charset=utf-8",
            complete: function (XMLHttpRequest, textStatus) {
                if (XMLHttpRequest.responseText == "out") {
                    var loginWindow = parent.mini.get("loginWindow");
                    if (!loginWindow.visible)
                        loginWindow.show();
                }
            }
        });

        mini.parse();

        var grid = mini.get("datagrid1");
        search();

        function search() {
            var key = mini.get("key").getValue();
            var state = mini.get("state").getValue();
            var type = mini.get("type").getValue();
            var edu = mini.get("edu").getValue();
            var sdate = mini.get("sdate").getText();
            var edate = mini.get("edate").getText();
            var yx1 = mini.get("yx1").getValue();
            var yx2 = mini.get("yx2").getValue();
            var major1 = mini.get("major1").getValue();
            var major2 = mini.get("major2").getValue();
            $("#Hidden1").val(key);
            $("#Hidden2").val(state);
            $("#Hidden3").val(type);
            $("#Hidden4").val(edu);
            $("#Hidden5").val(sdate);
            $("#Hidden6").val(edate);
            $("#Hidden7").val(yx1);
            $("#Hidden8").val(yx2);
            $("#Hidden9").val(major1);
            $("#Hidden10").val(major2);

            grid.load({ key: key, state: state, type: type, edu: edu, sdate: sdate, edate: edate, yx1: yx1, yx2: yx2, major1: major1, major2: major2 });
            grid.sortBy("pi_no", "desc");
        }

        function onTypeChanged(e) {
            var yx1 = mini.get("yx1").getValue();
            mini.get("yx2").setValue("");
            var url = "../data/system.aspx?method=CbxJobTypeByP&id=" + yx1
            mini.get("yx2").setUrl(url);
            mini.get("yx2").select(0);
        }

        function onMajorChanged(e) {
            var major1 = mini.get("major1").getValue();
            mini.get("major2").setValue("");
            var url = "../data/system.aspx?method=CbxMajorByP&id=" + major1
            mini.get("major2").setUrl(url);
            mini.get("major2").select(0);
        }

        function onNameRenderer(e) {
            var n = "";
            if (e.record.pi_name != null)
                n = e.record.pi_name;
            var s = '<a class="noline" style="color:Black" title="编  号：' + e.record.pi_no + '&#13用户名：' + e.record.pi_user + '">' + e.record.pi_name + '</a>';
            if (e.record.pi_hide == 0)
                s = s + '[<font color="#009900">简历开启</font>]';
            else if (e.record.pi_hide == 1)
                s = s + '[<font color="#ff0000">简历关闭</font>]';
            else if (e.record.pi_hide == 2)
                s = s + '[简历半开启]';
            return s;
        }

        function onStateRenderer(e) {
            for (var i = 0; i < State.length; i++) {
                var s = State[i];
                if (s.id == e.value)
                    return s.text;
            }
            return "";
        }

        function onSpCodeRenderer(e) {
            var s = e.record.spcode;
            if (e.record.pi_sp != null && e.record.pi_sp != "")
                s = s + '(' + e.record.pi_sp + ')';
            return s;
        }


        function onJobtype1Renderer(e) {
            var record = e.record;
            if (record.yx11 != null)
                return e.value + '(' + record.yx11 + ')';
            return e.value;
        }

        function onJobtype2Renderer(e) {
            var record = e.record;
            if (record.yx22 != null)
                return e.value + '(' + record.yx22 + ')';
            return e.value;
        }

        function onPicRenderer(e) {
            var s = '未上传';
            if (e.record.pi_pic != null && e.record.pi_pic != '')
                s = '<a class="linelink" target="_blank" href="' + e.record.pi_pic + '">查看</a>';
            return s;
        }

        function onMobileRenderer(e) {
            var record = e.record;
            if (e.value == null || e.value == "")
                return record.pi_mobile;
            return e.value;
        }

        function editRow(row_uid) {
            var row = grid.getRowByUID(row_uid);
            if (row) {
                var form = new mini.Form("#editForm");
                form.loading();
                form.clear();
                $("#editForm").show();
                $("#divList").hide();
                $.ajax({
                    url: "../data/system.aspx?method=GetPerson",
                    data: { id: row.pi_no },
                    success: function (text) {
                        if (text == "out") {
                            $("#divList").show();
                            $("#editForm").hide();
                            var loginWindow = parent.mini.get("loginWindow");
                            if (!loginWindow.visible)
                                loginWindow.show();
                            return;
                        }
                        var o = mini.decode(text);
                        mini.get("pi_no").setValue(o.pi_no);
                        mini.get("pi_state").setValue(o.pi_state);
                        $("#pi_user").html(o.pi_user);
                        $("#pi_name").html(o.pi_name);
                        $("#pi_sex").html(o.sex);
                        $("#pi_birth").html(o.pi_birth);
                        if(o.pi_marry==0)
                            $("#pi_marry").html("未婚");
                        else if (o.pi_marry == 1)
                            $("#pi_marry").html("已婚");
                        else if (o.pi_marry == 2)
                            $("#pi_marry").html("离异");
                        else if (o.pi_marry == 3)
                            $("#pi_marry").html("丧偶");
                        else if (o.pi_marry == null)
                            $("#pi_marry").html("");
                        else
                            $("#pi_marry").html(o.pi_marry);
                        $("#pi_height").html(o.pi_height + "cm");
                        $("#pi_weight").html(o.pi_weight + "kg");
                        $("#pi_polity").html(o.pi_polity);
                        $("#pi_nation").html(o.pi_nation);
                        $("#pi_hometown").html(o.hometown);
                        $("#pi_zhicheng").html(o.pi_zhicheng);
                        $("#pi_edu").html(o.edu);
                        $("#pi_bysj").html(o.pi_bysj);
                        $("#pi_college").html(o.pi_college);
                        $("#pi_spcode").html(o.spcode);
                        $("#pi_sp").html(o.pi_sp);
                        $("#pi_forlang").html(o.pi_forlang);
                        $("#pi_forlevel").html(o.pi_forlevel);
                        $("#pi_computer").html(o.pi_computer);
                        $("#pi_selfexp").html(o.pi_selfexp);
                        $("#pi_jobtype").html(o.jobtype);
                        $("#pi_workarea").html(o.workarea);
                        if(o.yx11 != null)
                            $("#pi_yx1").html(o.yx11);
                        else
                            $("#pi_yx1").html(o.yx1);
                        if (o.yx22 != null)
                            $("#pi_yx2").html(o.yx22);
                        else
                            $("#pi_yx2").html(o.yx2);
                        $("#pi_pay").html(o.pi_pay);
                        if (o.pi_mt == 1)
                            $("#pi_pay").html($("#pi_pay").html() + "(面谈)");
                        $("#pi_tel").html(o.pi_tel);
                        $("#pi_mobile").html(o.pi_mobile);
                        $("#pi_email").html(o.pi_email);
                        $("#pi_QQ").html(o.pi_QQ);
                        $("#pi_address").html(o.pi_address);
                    },
                    error: function () {
                        form.unmask();
                        ShowMessage("系统提示", "信息加载出错！", 3);
                    }
                });
                $.ajax({
                    url: "../data/system.aspx?method=GetStudyList",
                    data: { id: row.pi_no },
                    success: function (text) {
                        if (text == "out") {
                            $("#divList").show();
                            $("#editForm").hide();
                            var loginWindow = parent.mini.get("loginWindow");
                            if (!loginWindow.visible)
                                loginWindow.show();
                            return;
                        }
                        $("#studylist").empty();
                        var data = eval("(" + text + ")");
                        if (data.length > 0) {
                            $.each(data, function (i, item) {
                                var html = '<tr>';
                                html += '<td class="title" style="width: 100px;">起止年月：</td>';
                                html += '<td class="text">' + item.ed_syear + '年' + item.ed_smonth + '月 - ' + item.ed_eyear + '年' + item.ed_emonth + '月</td>';
                                html += '<td class="title" style="width: 100px;">学校：</td>';
                                html += '<td class="text">' + item.ed_school + '</td>';
                                html += '<td class="title" style="width: 100px;">学历：</td>';
                                html += '<td class="text">' + item.di_name + '</td>';
                                html += '</tr>';
                                html += '<tr>';
                                html += '<td class="title" style="width: 100px;">描述：</td>';
                                html += '<td class="text" colspan="5">' + item.ed_memo + '</td>';
                                html += '</tr>';
                                $("#studylist").append(html);
                            });
                        }
                    },
                    error: function () {
                        form.unmask();
                        ShowMessage("系统提示", "信息加载出错！", 3);
                    }
                });
                $.ajax({
                    url: "../data/system.aspx?method=GetWorkList",
                    data: { id: row.pi_no },
                    success: function (text) {
                        form.unmask();
                        if (text == "out") {
                            $("#divList").show();
                            $("#editForm").hide();
                            var loginWindow = parent.mini.get("loginWindow");
                            if (!loginWindow.visible)
                                loginWindow.show();
                            return;
                        }
                        $("#worklist").empty();
                        var data = eval("(" + text + ")");
                        if (data.length > 0) {
                            $.each(data, function (i, item) {
                                var html = '<tr>';
                                html += '<td class="title" style="width: 100px;">起止年月：</td>';
                                html += '<td class="text">' + item.wo_syear + '年' + item.wo_smonth + '月 - ' + item.wo_eyear + '年' + item.wo_emonth + '月</td>';
                                html += '<td class="title" style="width: 100px;">工作单位：</td>';
                                html += '<td class="text">' + item.wo_company + '</td>';
                                html += '<td class="title" style="width: 100px;">从事岗位：</td>';
                                if (item.position2 != null)
                                    html += '<td class="text">' + item.position2 + '</td>';
                                else
                                    html += '<td class="text">' + item.position + '</td>';
                                html += '</tr>';
                                html += '<tr>';
                                html += '<td class="title" style="width: 100px;">说明：</td>';
                                html += '<td class="text" colspan="5">' + item.wo_memo + '</td>';
                                html += '</tr>';
                                $("#worklist").append(html);
                            });
                        }
                    },
                    error: function () {
                        form.unmask();
                        ShowMessage("系统提示", "信息加载出错！", 3);
                    }
                });
            }
        }

        function updateRow() {
            var form = new mini.Form("#editForm");
            form.validate();
            if (form.isValid() == false)
                return;
            var id = mini.get("pi_no").getValue();
            var state = mini.get("pi_state").getValue();

            mini.mask({ el: document.body, cls: 'mini-mask-loading', html: '保存中，请稍后...' });
            $.ajax({
                url: "../data/system.aspx?method=CheckPerson",
                type: "post",
                data: { id: id, state: state },
                success: function (ret) {
                    mini.unmask(document.body);
                    if (ret == "out") {
                        var loginWindow = parent.mini.get("loginWindow");
                        if (!loginWindow.visible)
                            loginWindow.show();
                        return;
                    }
                    if (ret == 1) {
                        $("#divList").show();
                        $("#editForm").hide();
                        form.clear();
                        ShowMessage("系统提示", "会员审核成功！", 1);
                        grid.reload();
                    }
                    else if (ret == 0) {
                        $("#divList").show();
                        $("#editForm").hide();
                        form.clear();
                        ShowMessage("系统提示", "该会员已不存在，请确认！", 2);
                        grid.reload();
                    }
                    else
                        ShowMessage("系统提示", "会员审核失败！", 3);
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    mini.unmask(document.body);
                    ShowMessage("系统提示", "会员审核失败！", 3);
                }
            });
        }

        function cancelRow() {
            var form = new mini.Form("#editForm");
            form.clear();
            $("#divList").show();
            $("#editForm").hide();
        }

        function delRow(row_uid) {
            var row = grid.getRowByUID(row_uid);
            if (row) {
                mini.confirm("确定删除此会员吗？", "系统提示",
                    function (action) {
                        if (action == "ok") {
                            var messageid = mini.loading("删除中，请稍后......", "系统提示");
                            $.ajax({
                                url: "../data/system.aspx?method=DeletePerson",
                                type: "post",
                                data: { id: row.pi_no },
                                success: function (ret) {
                                    mini.hideMessageBox(messageid);
                                    if (ret == "out") {
                                        var loginWindow = parent.mini.get("loginWindow");
                                        if (!loginWindow.visible)
                                            loginWindow.show();
                                        return;
                                    }
                                    if (ret >= 0) {
                                        ShowMessage("系统提示", "会员删除成功！", 1);
                                        grid.reload();
                                    }
                                    else
                                        ShowMessage("系统提示", "会员删除失败！", 3);
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    mini.hideMessageBox(messageid);
                                    ShowMessage("系统提示", "会员删除失败！", 3);
                                }
                            });
                        }
                    }
                );
            }
        }

        function checkRows(state) {
            var rows = grid.getSelecteds();
            if (rows.length > 0) {
                mini.confirm("确定审核所选会员吗？", "系统提示",
                    function (action) {
                        if (action == "ok") {
                            var messageid = mini.loading("操作中，请稍后......", "系统提示");
                            var ids = "";
                            for (var i = 0; i < rows.length; i++) {
                                ids += rows[i].pi_no + ',';
                            }

                            $.ajax({
                                url: "../data/system.aspx?method=CheckPerson",
                                type: "post",
                                data: { id: ids, state: state },
                                success: function (ret) {
                                    mini.hideMessageBox(messageid);
                                    if (ret == "out") {
                                        var loginWindow = parent.mini.get("loginWindow");
                                        if (!loginWindow.visible)
                                            loginWindow.show();
                                        return;
                                    }
                                    if (ret >= 0) {
                                        ShowMessage("系统提示", "会员审核成功！", 1);
                                        grid.reload();
                                    }
                                    else
                                        ShowMessage("系统提示", "会员审核失败！", 3);
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    mini.hideMessageBox(messageid);
                                    ShowMessage("系统提示", "会员审核失败！", 3);
                                }
                            });
                        }
                    }
                );
            } else
                ShowMessage("系统提示", "请选择需要审核的会员！", 2);
        }

        function delRows() {
            var rows = grid.getSelecteds();
            if (rows.length > 0) {
                mini.confirm("确定删除所选会员吗？", "系统提示",
                    function (action) {
                        if (action == "ok") {
                            var messageid = mini.loading("删除中，请稍后......", "系统提示");
                            var ids = "";
                            for (var i = 0; i < rows.length; i++) {
                                ids += rows[i].pi_no + ',';
                            }

                            $.ajax({
                                url: "../data/system.aspx?method=DeletePerson",
                                type: "post",
                                data: { id: ids },
                                success: function (ret) {
                                    mini.hideMessageBox(messageid);
                                    if (ret == "out") {
                                        var loginWindow = parent.mini.get("loginWindow");
                                        if (!loginWindow.visible)
                                            loginWindow.show();
                                        return;
                                    }
                                    if (ret >= 0) {
                                        ShowMessage("系统提示", "会员删除成功！", 1);
                                        grid.reload();
                                    }
                                    else
                                        ShowMessage("系统提示", "会员删除失败！", 3);
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    mini.hideMessageBox(messageid);
                                    ShowMessage("系统提示", "会员删除失败！", 3);
                                }
                            });
                        }
                    }
                );
            } else
                ShowMessage("系统提示", "请选择需要删除的会员！", 2);
        }

        function lockRows(state) {
            var rows = grid.getSelecteds();
            var msg = "关闭";
            if (state == 0)
                msg = "开启";
            if (rows.length > 0) {
                mini.confirm("确定" + msg + "所选会员简历吗？", "系统提示",
                    function (action) {
                        if (action == "ok") {
                            var messageid = mini.loading("操作中，请稍后......", "系统提示");
                            var ids = "";
                            for (var i = 0; i < rows.length; i++) {
                                ids += rows[i].pi_no + ',';
                            }

                            $.ajax({
                                url: "../data/system.aspx?method=LockPerson",
                                type: "post",
                                data: { id: ids, state: state },
                                success: function (ret) {
                                    //mini.hideMessageBox(messageid);
                                    if (ret == "out") {
                                        var loginWindow = parent.mini.get("loginWindow");
                                        if (!loginWindow.visible)
                                            loginWindow.show();
                                        return;
                                    }
                                    if (ret >= 0) {
                                        ShowMessage("系统提示", "会员简历" + msg + "成功！", 1);
                                        grid.reload();
                                    }
                                    else
                                        ShowMessage("系统提示", "会员简历" + msg + "失败！", 3);
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    //mini.hideMessageBox(messageid);
                                    ShowMessage("系统提示", "会员简历" + msg + "失败！", 3);
                                }
                            });
                        }
                    }
                );
            } else
                ShowMessage("系统提示", "请选择需要" + msg + "的会员简历！", 2);
        }

        function excelRow() {
            mini.confirm("确定导出求职人才手机号码吗？", "系统提示",
                function (action) {
                    if (action == "ok") {
                        $("#excelForm").submit();
                    }
                }
            );
        }
    </script>
</body>
</html>